<?php
class Model_Test extends CI_Controller {
	
	function index() {
		//$this->load->model ( "Items_Model", "items_model" );
		//$this->items_model->getPublicItems(0, 5, 2);
		//$this->items_model->getPopularItems(0, 2);
		//$this->items_model->getItemsToUser("liangdong", 0, 10, 2);
		//$this->items_model->getItemsByHost( "cjphenry", 0, 10, 2);
		//$this->items_model->getItemsByGuest( "liangdong", "cjphenry", 0, 10, 2);
		//$data = array('USERID'=>'cjphenry','TITLE'=>'title','CONTENT'=>'content','PICPATHS'=>'no','SCOPE'=>1,'TOUSERIDS'=>'|liangdong|tangyang|');
		//$this->items_model->createItem( $data );
		//$this->items_model->createItem('{"user_id":"cjp","title":"123","content":"123","type":3,"hot":4,"scope":5}');
		//$this->items_model->deleteItem ( 5 );
		
		//$this->load->model("Users_Model", "users_model" );
		//$this->users_model->getProfile("cjphenry");
		//$this->users_model->getFriends( "cjphenry", 0, 2 );
		//$this->users_model->updateProfile("cjphenry", array("PASSWORD"=>"11111", "REALNAME"=>"JIAPENG"));
		//$data = array("USERID"=>"wo","PASSWORD"=>"123","NICKNAME"=>"WO","REALNAME"=>"WO","GENDER"=>"NAN","BIRTH"=>"1987-07-07","ADDRESS"=>"BJ","PORTRAITPATH"=>"NO");
		//$this->users_model->addUser($data);
		//$this->users_model->addFriend(array("HOSTID"=>"cjphenry","FRIENDID"=>"ppppp"));
		//$this->users_model->getRelation("cjphenry", "ppppp");
		//$this->users_model->deleteFriend("cjphenry", "ppppp");
		//$this->users_model->createCircle('{"user_id":"cjphenry","name":"good","description":"good friend","members":"liang"}');
		//$this->users_model->addUserToCircle("ma",3);
		//$this->users_model->updateCircle('{"circle_id":3,"user_id":"cjphenry","name":"goodgood","description":"good","members":"liang"}');
		//$this->users_model->deleteCircle(3);
		//$this->users_model->deleteUserFromCircle("yang", 1);
		
		//$this->load->model("Circles_Model", "circles_model" );
		//$this->circles_model->getCircle( 1 );
		//$this->circles_model->getCircles( "cjphenry" );
		//$this->circles_model->addCircle(array("USERID"=>"cjphenry","NAME"=>"FAMILY","DESCRIPTION"=>"FAMILY","MEMBERS"=>"|jun|"));
		//$this->circles_model->updateCircle(1, array("MEMBERS"=>"|liangdong|tangyang|"));
		//$this->circles_model->deleteCircle( 1 );
		
		$this->load->model("Comments_Model", "comments_model" );
		//$this->comments_model->getItemComments(1, 0, 5);
		//$this->comments_model->getCommentsToUser("liangdong", 0 ,5);
		//$this->comments_model->getCommentsByUser("cjphenry", 0, 3);
		$this->comments_model->addComment(array("ITEMID"=>1, "USERID"=>"cjphenry", "TOUSERID"=>"liangdong", "CONTENT"=>"content"));
		
		//$this->load->model("Notifications_Model", "notifications_model" );
		//$this->notifications_model->getNewPushItemNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getAllPushItemNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getNewRelationNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getAllRelationNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getNewCommentNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getAllCommentNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getAllNewNotifications("cjphenry", 0, 5);
		//$this->notifications_model->getAllNotifications("cjphenry", 0, 9);
		//$this->notifications_model->addPushItemNotification('{"user_id":"cjphenry", "content":"asdfasdf"}');
		//$this->notifications_model->addRelationNotication('{"user_id":"cjphenry", "content":"asdfasdf"}');
		//$this->notifications_model->addCommentNotication('{"user_id":"cjphenry", "content":"asdfasdf"}');
		//$this->notifications_model->cancelNotification(1);
	}
}
